package com.qingyouchuxing.mall.biz.convert;

import com.qingyouchuxing.mall.biz.domain.dto.MallMailAddressDTO;
import com.qingyouchuxing.mall.biz.domain.entity.MallMailAddress;
import com.qingyouchuxing.mall.biz.domain.vo.MallMailAddressVO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

@Mapper
public interface MallMailAddressConvert {
    MallMailAddressConvert INSTANCES = Mappers.getMapper(MallMailAddressConvert.class);

    @Mapping(target = "version", ignore = true)
    @Mapping(target = "updateTime", ignore = true)
    @Mapping(target = "updateBy", ignore = true)
    @Mapping(target = "searchValue", ignore = true)
    @Mapping(target = "params", ignore = true)
    @Mapping(target = "delFlag", ignore = true)
    @Mapping(target = "createTime", ignore = true)
    @Mapping(target = "createBy", ignore = true)
    MallMailAddress toEntity(MallMailAddressDTO entity);

    @Mapping(target = "version", ignore = true)
    @Mapping(target = "updateTime", ignore = true)
    @Mapping(target = "updateBy", ignore = true)
    @Mapping(target = "searchValue", ignore = true)
    @Mapping(target = "params", ignore = true)
    @Mapping(target = "createTime", ignore = true)
    @Mapping(target = "createBy", ignore = true)
    MallMailAddress votoEntity(MallMailAddressVO entity);
}
